import { NestFactory } from '@nestjs/core';
import * as session from 'express-session';
import { AppModule } from './app.module';
import config from './config';
import { SessionStore } from './util/session-store';
const { cookie, keys } = config;

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.use(session({
    secret: keys,
    resave: false,
    saveUninitialized: false,
    cookie,
    store: new SessionStore(),
  }))
  await app.listen(3000);
}
bootstrap();
